package com.template.app.service.impl;

import java.io.Serializable;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.template.app.dao.GenericDao;
import com.template.app.service.GenericService;

@Service
public class GenericServiceImpl implements GenericService {
	
	@Autowired
	private GenericDao dao;
	
	public boolean exists(Class<?> clazz, Serializable id) {
		return dao.exists(clazz, id);
	}

	public <T> T get(Class<T> clazz, Serializable id) {
		return dao.get(clazz, id);
	}

	public <T> T load(Class<T> clazz, Serializable id) {
		return dao.load(clazz, id);
	}

}
